
<?php
function logoffJava(){
	// Initialize options for REST interface
	$url="http://localhost/login/service/logoff-user";

	//open connection
	$ch = curl_init();

	//set the url, number of POST vars, POST data
	curl_setopt($ch,CURLOPT_URL, $url);
	#curl_setopt($ch,CURLOPT_GET);
	curl_exec($ch);
	//close connection
	curl_close($ch);
}

// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
    setcookie(session_name(), '', time()-42000, '/');
}

// Finally, destroy the session.
session_destroy();

logoffJava();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>LOGIN</title>
    <META http-equiv="refresh" content="0;URL=/sistema">
  </head>
  <body></body>
</html>